function tail_summary()


c=datac('control');
sel = getmainselection;

for i = sel,if(~isempty(c(i).tail)) bfast(i) = c(i).tail.bfast(2), else bfast(i) = NaN, end, end;
for i = sel,if(~isempty(c(i).tail)) bslow(i) = c(i).tail.bslow(2), else bslow(i) = NaN, end, end;
for i = sel,if(~isempty(c(i).tail)) tauf(i) = c(i).tail.taufast, else tauf(i) = NaN, end, end;

sym = {'rx', 'bo', 'gx', 'k+', 'cx', 'm^'};
u = unique({c(:).filename});
figure
k = 1;
for i = sel
    m = strmatch(u(k), {c.filename});
    mm = intersect(m, sel);
    plot(mm, bfast(mm), sym{k});
    hold on;
    k = k + 1;
end;
cs = [c(sel).tail];
a1m = mean([cs.a1]);
a1s = std([cs.a1]);

a1m
a1s
bf = [cs.bfast];
imax = bf(2:4:end);
gm = imax./(cs.vtail-84)

